﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Lapv.Master"  CodeBehind="CateManager.aspx.cs" Inherits="Lapv.page.CateManager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="header" runat="server">
 
    <%--menu tab  --%>
    <div class="tabnav">
        <ul>
            <li class="active"><a href="<%= domain%>Pages/CateManager.aspx" class="list_d">D/S danh mục</a></li>
            <li><a href="<%= domain%>Pages/CateAdd.aspx" class="add_t">Thêm danh mục</a></li> 
        </ul>
        <div class="clr">
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
 
   <%--form2 list - grid -table--%>
    <div class="form form2">
        <asp:DataGrid ID="dtgrid" runat="server" CssClass="table1" AutoGenerateColumns="false" OnItemDataBound="dtgrid_ItemDataBound" OnItemCommand="Update_ItemCommand">
            <Columns>
                <asp:TemplateColumn HeaderText="ID" ItemStyle-Width="60">
                    <itemtemplate>
                        <asp:Label runat="server" ID="lb_id" Text='<%# Eval("id") %>' />
                    </itemtemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Tên danh mục" >
                    <itemtemplate>
                        <a href="<%=domain %>Pages/NewsManager.aspx?tid=<%# Eval("id") %>">
                            <%# Eval("name") %>
                        </a>
                     </itemtemplate>
                </asp:TemplateColumn> 
                <asp:TemplateColumn HeaderText="Sửa" ItemStyle-Width="60">
                    <itemtemplate>
                     <asp:LinkButton runat="server" ID="lbt_edit" CommandName="edit" CommandArgument='<%# Eval("id") %>'
                        Text="Sửa"><img src="../styles/imgs/edit.gif " /></asp:LinkButton>
                    </itemtemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Xóa" ItemStyle-Width="60">
                    <itemtemplate>
                    <asp:LinkButton runat="server" ID="lbtn_delete" CommandName="delete" OnClientClick="return confirm('Xóa danh mục vĩnh viễn và cả các tin liên quan?')"
                        CommandArgument='<%# Eval("id") %>' Text="Xóa">
                        <img src="../styles/imgs/delete.gif " /></asp:LinkButton>
                </itemtemplate>
                </asp:TemplateColumn>
            </Columns>
        </asp:DataGrid>
    </div>
  
</asp:Content>